package com.ruoyi.system.service.impl;

import com.ruoyi.system.mapper.SysAreaMapper;
import com.ruoyi.system.service.ISysAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 行政区表 服务实现
 *
 * @author Ai
 */
@Service
public class SysAreaServiceImpl implements ISysAreaService {
    @Autowired
    private SysAreaMapper sysAreaMapper;



    @Override
    public Long selectAreaIdByAreaName(String areaName) {
        return sysAreaMapper.selectAreaIdByAreaName(areaName);
    }

    @Override
    public Long selectParentAreaIdByAreaName(String areaName) {
        return sysAreaMapper.selectParentAreaIdByAreaName(areaName);
    }

    @Override
    public String selectAreaNameByAreaId(Long areaId) {
        return sysAreaMapper.selectAreaNameByAreaId(areaId);
    }

    @Override
    public List<Long> selectSonByAreaId(Long areaId) {

        return sysAreaMapper.selectSonByAreaId(areaId);
    }
}
